package state.person;

public enum PersonState
{
    
    waiting(0x01),
    goingIn(0x02),
    inside(0x03),
    goingOut(0x04),
    atDestination(0x05);
    
    private byte identifier;
    
    private PersonState(int identifier){
    	this.identifier = (byte) identifier;
    }
    
    public byte getIdentifier(){
    	return identifier;
    }
    
    public static PersonState getStateTypeForId(byte identifier){
    	for(PersonState s : PersonState.values()){
    		if (identifier == s.getIdentifier()){
    			return s;
    		}
    	}
    	return null;
    }
    
}
